package unit3;

public class Ex3_10_MainTest {
    public static void main(String[] args) {
        Test c1 = new Test();
        c1. printVar();
        c1. printVar();
        Test c2 = new Test();
        c2. printVar();
        c2. printVar();
    }
}
class Test {
    static int i; //定义i为类变量
    int j; //定义j为实例变量
    public void printVar() {
        int k = 0;
        i++;
        j++;
        k++;
        System.out.println("i=" + i + "    j=" + j + "    k=" + k);
    }
}
